
pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let left = num_str.find(|it| {
        it=='('
    }).unwrap();
    let right = num_str.find(|it| {
        it==')'
    }).unwrap();
    let base = num_str[left+1..right].parse::<u32>().unwrap();
    let origin_num =  num_str.split_at(left).0;
    if base==to_base {
        return origin_num.to_string();
    }
    let mut origin_num = u32::from_str_radix(origin_num, base).unwrap();
    let mut res = String::new();
    while origin_num>0 {
        let left = origin_num % to_base;
        let left = char::from_digit(left, to_base).unwrap();
        res.insert(0, left);
        origin_num /= to_base;
    }
    return res;
}
